GtkExpanderPrivate *priv;
GtkAllocation allocation;
GtkContainer *container;
- int focus_width;
int expander_size;
int expander_spacing;
guint border_width;
container = GTK_CONTAINER (expander);
gtk_widget_style_get (widget,
- "focus-line-width", &focus_width,
"expander-size", &expander_size,
"expander-spacing", &expander_spacing,
NULL);
else
area->height = 0;
- area->height += focus_width;
area->height = MAX (area->height, expander_size + 2 * expander_spacing);
area->height += border.top + border.bottom;
}
gint border_width;
gint expander_size;
gint expander_spacing;
- gint focus_width;
gboolean ltr;
GtkBorder border;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_widget_style_get (widget,
- "focus-line-width", &focus_width,
"expander-size", &expander_size,
"expander-spacing", &expander_spacing,
NULL);
gtk_widget_get_allocation (priv->label_widget, &label_allocation);
if (expander_size < label_allocation.height)
- rect->y += focus_width + (label_allocation.height - expander_size) / 2;
+ rect->y += (label_allocation.height - expander_size) / 2;
else
rect->y += expander_spacing;
}
guint border_width;
gint expander_size;
gint expander_spacing;
- gint focus_width;
gint label_height;
gint label_xpad, label_xoffset;
gint child_ypad, child_yoffset;
gtk_widget_set_allocation (widget, allocation);
gtk_widget_style_get (widget,
- "focus-line-width", &focus_width,
"expander-size", &expander_size,
"expander-spacing", &expander_spacing,
NULL);
get_padding_and_border (widget, &border);
/* Calculate some offsets/padding first */
- label_xoffset = border_width + expander_size + focus_width + 2 * expander_spacing + border.left;
- label_xpad = 2 * border_width + expander_size + 2 * focus_width + 2 * expander_spacing + border.left + border.right;
+ label_xoffset = border_width + expander_size + 2 * expander_spacing + border.left;
+ label_xpad = 2 * border_width + expander_size + 2 * expander_spacing + border.left + border.right;
child_yoffset = border_width + priv->spacing + border.top + border.bottom;
child_ypad = 2 * border_width + priv->spacing + border.top + border.bottom;
label_allocation.x = allocation->x + allocation->width -
(label_allocation.width + label_xoffset);
- label_allocation.y = allocation->y + border_width + focus_width + border.top;
+ label_allocation.y = allocation->y + border_width + border.top;
label_allocation.height = MIN (label_height,
allocation->height - 2 * border_width -
- 2 * focus_width -
border.top - border.bottom -
(child_visible ? priv->spacing : 0));
label_allocation.height = MAX (label_allocation.height, 1);
GtkAllocation child_allocation;
gint top_height;
- top_height = MAX (2 * expander_spacing + expander_size,
- label_height + 2 * focus_width);
+ top_height = MAX (2 * expander_spacing + expander_size, label_height);
child_allocation.x = allocation->x + border_width;
child_allocation.y = allocation->y + top_height + child_yoffset;
GtkStyleContext *context;
gint x, y, width, height;
gint border_width;
- gint focus_width;
gint expander_size;
gint expander_spacing;
gboolean ltr;
gtk_widget_get_allocation (widget, &allocation);
gtk_widget_style_get (widget,
- "focus-line-width", &focus_width,
"expander-size", &expander_size,
"expander-spacing", &expander_spacing,
NULL);
height = label_allocation.height;
}
- width += 2 * focus_width;
- height += 2 * focus_width;
-
x = border_width + border.left;
y = border_width + border.top;
gint border_width;
gint expander_size;
gint expander_spacing;
- gint focus_width;
GtkBorder border;
child = gtk_bin_get_child (GTK_BIN (widget));
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_widget_style_get (GTK_WIDGET (widget),
- "focus-line-width", &focus_width,
"expander-size", &expander_size,
"expander-spacing", &expander_spacing,
NULL);
get_padding_and_border (widget, &border);
*minimum_size = *natural_size =
- expander_size + 2 * expander_spacing +
- 2 * focus_width;
+ expander_size + 2 * expander_spacing;
if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
{
gint border_width;
gint expander_size;
gint expander_spacing;
- gint focus_width;
GtkBorder border;
child = gtk_bin_get_child (GTK_BIN (widget));
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_widget_style_get (GTK_WIDGET (widget),
- "focus-line-width", &focus_width,
"expander-size", &expander_size,
"expander-spacing", &expander_spacing,
NULL);
get_padding_and_border (widget, &border);
- *minimum_size = *natural_size = 2 * focus_width;
+ *minimum_size = *natural_size = 0;
if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
{
gint border_width;
gint expander_size;
gint expander_spacing;
- gint focus_width;
gint label_xpad;
GtkBorder border;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_widget_style_get (GTK_WIDGET (widget),
- "focus-line-width", &focus_width,
"expander-size", &expander_size,
"expander-spacing", &expander_spacing,
NULL);
get_padding_and_border (widget, &border);
- label_xpad = 2 * border_width + expander_size + 2 * expander_spacing - 2 * focus_width;
+ label_xpad = 2 * border_width + expander_size + 2 * expander_spacing;
- *minimum_height = *natural_height = 2 * focus_width;
+ *minimum_height = *natural_height = 0;
if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
{